package com.qiang.test02;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class MyExecutorsDemo {
    public static void main(String[] args) {
        //创建默认线程池
        ExecutorService executorService = Executors.newCachedThreadPool();
        executorService.submit(()->{
            System.out.println(Thread.currentThread().getName());
        });

        ExecutorService executorService1 = Executors.newFixedThreadPool(10);
        executorService1.submit(()->{
            System.out.println(Thread.currentThread().getName());
        });
    }
}
